/*
package com.shen.demo.demos.web.compont.druidCompont;

import org.springframework.stereotype.Component;

import javax.persistence.PostPersist;
import javax.persistence.PostUpdate;
import javax.persistence.PreRemove;
@Component
public class MyEntityListener {

    @PostPersist
    public void postPersist(Object entity) {
        // 当实体被持久化后调用
        System.out.println("Entity has been persisted: " + entity);
    }

    @PostUpdate
    public void postUpdate(Object entity) {
        // 当实体被更新后调用
        System.out.println("Entity has been updated: " + entity);
    }

    @PreRemove
    public void preRemove(Object entity) {
        // 当实体被移除前调用
        System.out.println("Entity is about to be removed: " + entity);
    }
}*/
